package cheme.ProcessModel;

import org.eclipse.draw2d.ColorConstants;
import org.eclipse.draw2d.geometry.Point;

import cheme.ProcessModel.Visitors.IModelVisitor;

	// PA: COmmmenting Itranslatable, to stop the movement of Solvability status box.

public class SolvabilityStatus extends AbstractChild //implements ITranslatable
{	
	/*
	 * Stores the current placement of the Equations figure within the model's
	 * canvas.
	 */
	
	protected Point location = null;
	
	/*
	 * Solvability Status Message text. This is to be refelcted in the figure's rendering.
	 */
	// PA commented it for non feedback version
	//private String message = "Insufficient information to check";
	
	//	 PA added it for non feedback version
	private String message = "This feature is not available in this version.";

	private String color = "yellow";
	
	public SolvabilityStatus(IModelElement parent) {
		super(parent);
		// TODO Auto-generated constructor stub
	}

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Override
	public Object accept(IModelVisitor visitor) {
		// TODO Auto-generated method stub
		return null;
	}

	public Point getLocation()
	{
		if(null == location)
		{
			location = new Point(470,10);
			//location = new Point(420,10);
		}
		
		return location;
	}

	public void setLocation(Point location)
	{
		if(!this.location.equals(location))
		{
			Point oldBounds = this.location;
			
			this.location = location;
	
			firePropertyChange(P_CONSTRAINT, oldBounds, location);
		}
	}

	/**
	 * @param message the message to set
	 */
	public void setMessage(String message)
	{
		String oldValue = this.message;
		
		this.message = message;
		ProcessModelConstants.log.Write("Solvability Status"," ", message);
		
		// PA commented this work non feedback version
		//firePropertyChange(IPropertyAware.P_TEXT, oldValue, message);		
	}

	/**
	 * @return the message
	 */
	public String getMessage() {
		return message;
	}
	
	public void setColor(String color)
	{
		String oldValue = this.color ;
		
		this.color = color;
		// PA commented this work non feedback version
		//firePropertyChange(IPropertyAware.P_COLOR, oldValue, color);		
	}

	/**
	 * @return the message
	 */
	public String getColor() {
		return color;
	}
	

}
